package lab2;

public class BuilderFactory {
    public static Builder getBuilder(String class_name) {
        try {
            Class c = Class.forName("lab2."+class_name.split("_")[0]+"Builder");
            System.out.println(c.getName());
            return (Builder) c.newInstance();
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
            return new JTableBuilder();
        }
    }
}
